<?php
include_once('config/config.php');

$LoginAdmin = checkAuth();
// print_r($LoginAdmin);



$action = $_GET['action'] ?? '';

// 退出登录
if ($action == 'logout') {
  setcookie('LoginAdmin', '', time() - 1);
  showMsg('退出成功', 'login.php');
}

?>

<!DOCTYPE html>
<html lang="en">

<head>
  <!-- 引入公共样式 -->
  <?php include_once('common/meta.php'); ?>
</head>
<style>
  .username{
    font-size: 35px;
    text-align: center;
    padding: 40px;
    font-weight: 800;
    font-family: 'Courier New', Courier, monospace;
    color: rgba(0, 0, 0, 0.25);
  }
  .username span{
    height: 50px;
    line-height: 50px;
  }
</style>
<body>

  <?php include_once('common/header.php'); ?>

  <?php include_once('common/menu.php'); ?>

  <div class="content">
    <div class="header">
      <h1 class="page-title">后台首页</h1>
    </div>
    <ul class="breadcrumb">
      <li><a href="index.php">Home</a> <span class="divider">/</span></li>
      <li class="active">Index</li>
    </ul>
    <div class="username">
      <span>欢迎 <?php echo $LoginAdmin['username'] ?> 用户</span>
    </div>

    <div class="container-fluid">
      <div class="row-fluid">
        <?php include_once('common/footer.php'); ?>
      </div>
    </div>
  </div>
</body>

</html>
<!-- 引入js -->
<?php include_once('common/script.php'); ?>